using System.Linq;
using UnityEngine;
using UnityEditor;
using System.Collections;
 using System.Collections.Generic;
/*
public class CopyObjectPos : EditorWindow
{
    static GameObject copiedGO;
    [MenuItem("GameObject/MyTools/Copy Object Pos #&C")]
    static void Copy()
    {
        copiedGO = GameObject.Instantiate(Selection.activeGameObject);

    }
 
    [MenuItem("GameObject/MyTools/Paste Object Pos #&P")]
    static void Paste()
    {
        GameObject targetGO = Selection.activeGameObject;
        DFS(copiedGO.GetComponentsInChildren<Transform>(), targetGO.GetComponentsInChildren<Transform>());
        DestroyImmediate(copiedGO);
    }
    static void DFS(Transform[] copiedTf, Transform[] targetTf){
        for(int i=1;i<copiedTf.Length;i++){
            Debug.Log(""+targetTf[i].name+"="+copiedTf[i].name);
            targetTf[i].transform.position = copiedTf[i].transform.position;
            targetTf[i].transform.localRotation = copiedTf[i].transform.localRotation;
            targetTf[i].transform.localScale = copiedTf[i].transform.localScale;
            DFS(copiedTf[i].GetComponentsInChildren<Transform>(), targetTf[i].GetComponentsInChildren<Transform>());
        }
    }
}*/
